public class Event {

  /* Arrival Event */
  public static final int ARRIVAL = 1;
  /* Departure Event */
  public static final int DEPARTURE = 2;
  /* Event type */
  protected int type;
  /* Event time */
  protected double time;
  /* Customer */
  protected Customer customer;

  /**
   * Constructs an Event
   * @param type the Event type (ARRIVAL or DEPARTURE)
   * @param time the Event time
   */
   
  public Event(int type, double time) {
    this.type = type;
    this.time = time;
    this.customer = null;
  }
  
  /**
   * Constructs an Event
   * @param type the Event type (ARRIVAL or DEPARTURE)
   * @param time the Event time
   * @param customer the Customer that this Event applies to
   */
   
  public Event(int type, double time, Customer customer) {
    this.type = type;
    this.time = time;
    this.customer = customer;
  }

  /**
   * Returns the event type.
   * @return event type
   */
  
  public int getType() {
    return type;
  }
  
  /**
   * Returns the event time.
   * @return event time
   */

  public double getTime() {
    return time;
  }
  
  /**
   * Returns the customer (or null if no customer is specified)
   * @return the customer
   */
   
  public Customer getCustomer() {
    return customer;
  }

} 